package com.pan.hisystem.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author qingyang
 * @since 2022-03-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("h_drug")
@ApiModel(value="Drug对象", description="")
public class Drug implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "药品id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "药品名")
    private String name;

    @ApiModelProperty(value = "类型")
    private String type;

    @ApiModelProperty(value = "功效")
    private String efficacy;

    @ApiModelProperty(value = "生产商")
    private String producers;

    @ApiModelProperty(value = "单价")
    private Double price;

    @ApiModelProperty(value = "规范")
    private String specification;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "批发价")
    @TableField("wholesale_price")
    private Double wholesalePrice;

    @ApiModelProperty(value = "库存量")
    @TableField("storage_quantity")
    private Integer storageQuantity;

    @ApiModelProperty(value = "生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @TableField("production_date")
    private LocalDate productionDate;

    @ApiModelProperty(value = "保质期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @TableField("expiration_date")
    private LocalDate expirationDate;

    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;

    @ApiModelProperty(value = "创建日期")
    @TableField("create_date")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private LocalDate createDate;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_nameId")
    private Integer createNameid;


}
